// 系统管理
let baseName = '系统管理'
export const menu = {
    title: '系统管理',
    path: '/system',
    name: 'system',
    meta: {
        requiresAuth: true
    },
    component: resolve => {
        require(['@/pages/index/index.vue'], resolve)
    },
    redirect: {
        name: 'setting-index'
    },
    children: [
        {
            title: '用户管理',
            icon: 'yonghuguanli',
            path: '/system/user/manage',
            name: '用户管理',
            meta: {
                requiresAuth: true, //是否缓存页面
                breadcrumb: [baseName, '用户管理']
            },
            component: r => require.ensure([], () => r(require('@/pages/system/usermanage/index')), 'yonghuguanli')
        },
        // {
        //     path: '/system/user/add',
        //     name: 'addUser',
        //     component: r => require.ensure([], () => r(require('@/pages/system/usermanage/add/index')), 'addUser')
        // },
        // {
        //     path: '/system/user/details',
        //     name: 'detailsUser',
        //     component: r => require.ensure([], () => r(require('@/pages/system/usermanage/details/index')), 'detailsUser')
        // }
    ]
}

// [业务演示] 路由设置
export const router = {
    ...menu,
    children: [].concat(...menu.children.map(e => e.children || e))
}